package homework.homework03;

public class TV {
    //成员变量
    private String name;
    //空参构造器
    public TV(){

    }

    //带参构造器
    public TV(String name){
        this.name = name;
    }

    //成员方法
    public void play(String channel){
        System.out.println(name + "电视正在播放" + channel + "节目");
    }

    //合理暴露

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
